/**
 * 
 */
package com.switchs;

/**
 * @author lionbule
 *
 */
public class TestSwitchEnum {

	public static void main(String[] args) {
		String s = "the result is ";
		Animal a = Animal.DOG;
		switch(a){
			case CAT: {
				s+= Animal.CAT;
				break;
			}
			case DOG: {
				s+= Animal.DOG;
				break;
			}
			case COW: {
				s+= Animal.COW;
				break;
			}
			default:{
				s+="other animal.";
				break;
			}
		}
		System.out.println(s);
	}

	enum Animal{
		DOG, CAT, COW
	}
}
